/* 粮情检测页面样式 - 智慧粮仓系统样式 */

/* 引用公共样式 */
@import url('../css/common.css');

/* 页面特定样式 */
body {
    background: linear-gradient(130deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
    color: var(--theme-text-color);
}

/* 主内容区域 */
main {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: transparent;
}

.panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel.active {
    display: flex;
    opacity: 1;
}

/* 信息栏 */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--theme-card-bg);
    border-radius: var(--card-border-radius);
    padding: 14px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--theme-card-border);
    box-shadow: 0 4px 12px var(--theme-card-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.temp-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--theme-text-color);
}

.temp-display i {
    color: var(--theme-gradient-start);
    font-size: 20px;
}

.temp-display span {
    color: var(--theme-text-color);
}

.status-legend {
    display: flex;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--theme-text-color);
    font-weight: 500;
    opacity: 0.8;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.status-dot.normal {
    background-color: #34C759;  /* 绿色 - 正常状态 */
}

.status-dot.warning {
    background-color: #FF9500;  /* 橙色 - 警告状态 */
}

.status-dot.danger {
    background-color: #FF3B30;  /* 红色 - 错误状态 */
}

/* 表格包装器 */
.tables-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 表格容器 */
.tables-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 16px;
}

.table-container {
    margin-bottom: 24px;
    background-color: rgba(10, 30, 80, 0.6);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: visible;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

th, td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 8px;
    text-align: center;
    font-size: 18px;
    transition: background-color 0.2s ease;
    height: 46px;
    vertical-align: middle;
    color: #FFFFFF;
    font-weight: 500;
}

th {
    color: #FFFFFF;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: -0.01em;
    height: 40px;
}

/* 左上角单元格（测点\电缆号） */
thead tr th:first-child {
    color: #FFFFFF;
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.01);
}

tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 第一列固定样式 */
tbody tr td:first-child {
    font-weight: 500;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    opacity: 0.9;
}

/* 第一层特殊样式 */
.first-layer-label,
.first-layer-data {
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 20px;
}

/* 即使是警告或危险状态，第一层的文字仍然保持白色文字颜色 */
.first-layer-data.warning,
.first-layer-data.danger {
    color: #FFFFFF !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 温湿度异常样式 */
td.warning {
    background-color: rgba(255, 149, 0, 0.15);
    color: #FFCC80;
    font-weight: 500;
}

td.danger {
    background-color: rgba(255, 59, 48, 0.15);
    color: #FF8A80;
    font-weight: 500;
}

/* 自定义响应式样式 */
@media (max-width: 768px) {
    .info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    
    .status-legend {
        width: 100%;
        justify-content: space-between;
    }
    
    th, td {
        padding: 8px;
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tables-wrapper {
    animation: fadeIn 0.5s ease;
}